<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <link rel="stylesheet" type="text/css" href="style.css" />
   </head>
   <body onload="if (top.frames['componentsframe'] == undefined) { s = window.location.toString(); window.location = 'index.html?p=' + s.substring(s.lastIndexOf('/')+1); }">
<h2 class="comptitle">Msg File <i>src/base/messages/NetwPkt.msg</i></h2>
<table class="typestable">
   <tr>
      <th class="name">Name</th>
      <th class="type">Type</th>
      <th class="description">Description</th>
   </tr>
<tr>
   <td>
<a href="NetwPkt.html">NetwPkt</a>
   </td>
   <td>
<i>packet</i>
   </td>
   <td>

<p>A basic network layer packet definition</p>

   </td>
</tr>
</table>
<h3 class="subtitle">Source code:</h3>
<pre class="src"><span style="color: #808080; font-style: italic; ">//**************************************************************************
// * file:        NetwPkt.msg
// *
// * author:      Daniel Willkomm
// *
// * copyright:   (C) 2004 Telecommunication Networks Group (TKN) at
// *              Technische Universitaet Berlin, Germany.
// *
// *              This program is free software; you can redistribute it 
// *              and/or modify it under the terms of the GNU General Public 
// *              License as published by the Free Software Foundation; either
// *              version 2 of the License, or (at your option) any later 
// *              version.
// *              For further information see file COPYING 
// *              in the top level directory
// **************************************************************************
// * part of:     framework implementation developed by tkn
// * description: - base class for network layer packets
// *              - subclass to create your own network layer packets
// **************************************************************************/
</span><span style="color: #000000; ">
</span><span style="color: #800000; font-weight: bold; ">cplusplus</span><span style="color: #000000; "> {{
    #</span><span style="color: #000000; ">include</span><span style="color: #000000; "> </span><span style="color: #008000; ">&quot;SimpleAddress.h&quot;</span><span style="color: #000000; ">
}}

</span><span style="color: #800000; font-weight: bold; ">class</span><span style="color: #000000; "> </span><span style="color: #000000; ">LAddress</span><span style="color: #000000; ">::</span><span style="color: #000000; ">L3Type</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">extends</span><span style="color: #000000; "> </span><span style="color: #000000; ">void</span><span style="color: #000000; ">;

</span><span style="color: #808080; font-style: italic; ">// A basic network layer packet definition
//
// subclass if you want to create your own network layer packet class
//
// The basic network packet contains a destination and source network address.
// Additionally a time to live (ttl) field can be defined in order to limit the
// maximum number of hops the messge will travel. The sequence number is guranteed
// to be unique for all packets generated by one host
//
// </span><span style="color: #000080; ">@author</span><span style="color: #808080; font-style: italic; "> Daniel Willkomm
</span><span style="color: #800000; font-weight: bold; ">packet</span><span style="color: #000000; "> </span><span style="color: #000000; ">NetwPkt</span><span style="color: #000000; ">
{
    </span><span style="color: #000000; ">LAddress</span><span style="color: #000000; ">::</span><span style="color: #000000; ">L3Type</span><span style="color: #000000; "> </span><span style="color: #000000; ">destAddr</span><span style="color: #000000; ">;   </span><span style="color: #808080; font-style: italic; ">// destination address
</span><span style="color: #000000; ">    </span><span style="color: #000000; ">LAddress</span><span style="color: #000000; ">::</span><span style="color: #000000; ">L3Type</span><span style="color: #000000; "> </span><span style="color: #000000; ">srcAddr</span><span style="color: #000000; ">;    </span><span style="color: #808080; font-style: italic; ">// source address
</span><span style="color: #000000; ">    </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; ">              </span><span style="color: #000000; ">ttl</span><span style="color: #000000; "> = </span><span style="color: #008000; ">1</span><span style="color: #000000; ">;    </span><span style="color: #808080; font-style: italic; ">// time to live field (IP)
</span><span style="color: #000000; ">    </span><span style="color: #000080; font-weight: bold; ">unsigned</span><span style="color: #000000; "> </span><span style="color: #000080; font-weight: bold; ">long</span><span style="color: #000000; ">    </span><span style="color: #000000; ">seqNum</span><span style="color: #000000; "> = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// sequence number
</span><span style="color: #000000; ">}

</span></pre>
   <hr><p class="footer"><a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top"><img src="by-sa.png"></a> This documentation is released under the <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top">Creative Commons license</a></p>
   </body>
</html>
